<template>
	<view>
		<view class="card-content">
			<view class="card-head">{{$t('operate.basicInformation')}}</view>  <!--基本信息-->
			<view class="card-body">
				<view class="body-list">
					<view class="list-name">{{$t('operate.businessName')}}</view> <!--商户名称-->
					<view class="list-value">{{userInfo.channelName}}</view>
				</view>
				<view class="body-list">
					<view class="list-name">{{$t('operate.merchantID')}}</view> <!--商户ID-->
					<view class="list-value">{{userInfo.id}}</view>
				</view>
			</view>
		</view>
		<view class="card-content">
			<view class="card-head">{{$t('operate.accountsReceivable')}}</view> <!--收款账户-->
			<view class="card-body">
				<view class="body-list">
					<view class="list-name">{{$t('operate.accountsReceivable')}}</view> <!--收款账户-->
					<view class="list-value">{{userInfo.bankName}}</view>
				</view>
				<view class="body-list">
					<view class="list-name">{{$t('operate.receivingAccount')}}</view> <!--收款账号-->
					<view class="list-value">{{userInfo.bankNo}}</view>
				</view>
				<view class="body-list">
					<view class="list-name">{{$t('operate.receivingBank')}}</view> <!--收款开户行-->
					<view class="list-value">{{userInfo.createBank}}</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		channelMerImageInfo
	} from '@/api/api.js';
	export default {
		data() {
			return {
				userInfo:{}
			}
		},
		onLoad() {
			this.getChannelMerImageInfo()
		},
		onShow() {
			uni.setNavigationBarTitle({
				title: this.$t('navigation.accountInformation')
			});
		},
		methods: {
			getChannelMerImageInfo() {
				let _this = this
				channelMerImageInfo().then(res => {
					_this.userInfo = res.data
				})
			}
		}
	}
</script>

<style lang="scss">
	.card-content {
		background-color: #FFFFFF;
		margin-bottom: 13rpx;

		.card-head {
			font-size: 32rpx;
			font-weight: bold;
			padding: 30rpx 40rpx;
			border-bottom: 1rpx solid #F5F5F8;
		}

		.body-list {
			display: flex;
			justify-content: space-between;
			align-items: center;
			
			padding: 34rpx 40rpx;
			.list-name {
				flex-shrink: 0;
				width: 140rpx;
				color: #666666;
			}

			.list-value {
				margin-left: 20rpx;
				font-weight: bold;
			}
		}
	}
</style>
